package cn.skyquant.quant4j.api.economics;

import cn.skyquant.quant4j.sdk.enums.CompareType;
import cn.skyquant.quant4j.sdk.enums.TradeDirection;

import java.util.Objects;

public class EconomicsCategoryImpactDTO {
    private static final long serialVersionUID = 112341123L;
    public int categoryId;
    public CompareType type;
    public String symbol;
    public TradeDirection td;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        EconomicsCategoryImpactDTO that = (EconomicsCategoryImpactDTO) o;
        return categoryId == that.categoryId &&
                type == that.type &&
                symbol.equals(that.symbol);
    }

    @Override
    public int hashCode() {
        return Objects.hash(categoryId, type, symbol);
    }

    @Override
    public String toString() {
        return "{" +
                "categoryId=" + categoryId +
                ", type=" + type +
                ", symbol='" + symbol + '\'' +
                ", td=" + td.name() +
                '}';
    }
}
